3.1335 \(\int \frac{A+B x}{(d+e x) \left (a+c x^2\right )} \, dx\)

Optimal. Leaf size=109 \[ \frac{\log \left (a+c x^2\right ) (B d-A e)}{2 \left (a e^2+c d^2\right )}-\frac{(B d-A e) \log (d+e x)}{a e^2+c d^2}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)}{\sqrt{a} \sqrt{c} \left (a e^2+c d^2\right )} \]

[Out]

((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[c]*(c*d^2 + a*e^2))
- ((B*d - A*e)*Log[d + e*x])/(c*d^2 + a*e^2) + ((B*d - A*e)*Log[a + c*x^2])/(2*(
c*d^2 + a*e^2))

_______________________________________________________________________________________

Rubi [A]  time = 0.231011, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182 \[ \frac{\log \left (a+c x^2\right ) (B d-A e)}{2 \left (a e^2+c d^2\right )}-\frac{(B d-A e) \log (d+e x)}{a e^2+c d^2}+\frac{\tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)}{\sqrt{a} \sqrt{c} \left (a e^2+c d^2\right )} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x)/((d + e*x)*(a + c*x^2)),x]

[Out]

((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[c]*(c*d^2 + a*e^2))
- ((B*d - A*e)*Log[d + e*x])/(c*d^2 + a*e^2) + ((B*d - A*e)*Log[a + c*x^2])/(2*(
c*d^2 + a*e^2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 25.666, size = 95, normalized size = 0.87 \[ - \frac{\left (A e - B d\right ) \log{\left (a + c x^{2} \right )}}{2 \left (a e^{2} + c d^{2}\right )} + \frac{\left (A e - B d\right ) \log{\left (d + e x \right )}}{a e^{2} + c d^{2}} + \frac{\left (A c d + B a e\right ) \operatorname{atan}{\left (\frac{\sqrt{c} x}{\sqrt{a}} \right )}}{\sqrt{a} \sqrt{c} \left (a e^{2} + c d^{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)/(e*x+d)/(c*x**2+a),x)

[Out]

-(A*e - B*d)*log(a + c*x**2)/(2*(a*e**2 + c*d**2)) + (A*e - B*d)*log(d + e*x)/(a
*e**2 + c*d**2) + (A*c*d + B*a*e)*atan(sqrt(c)*x/sqrt(a))/(sqrt(a)*sqrt(c)*(a*e*
*2 + c*d**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.114473, size = 91, normalized size = 0.83 \[ \frac{2 \tan ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{a}}\right ) (a B e+A c d)-\sqrt{a} \sqrt{c} (B d-A e) \left (2 \log (d+e x)-\log \left (a+c x^2\right )\right )}{2 \sqrt{a} \sqrt{c} \left (a e^2+c d^2\right )} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x)/((d + e*x)*(a + c*x^2)),x]

[Out]

(2*(A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]] - Sqrt[a]*Sqrt[c]*(B*d - A*e)*(2*
Log[d + e*x] - Log[a + c*x^2]))/(2*Sqrt[a]*Sqrt[c]*(c*d^2 + a*e^2))

_______________________________________________________________________________________

Maple [A]  time = 0.009, size = 159, normalized size = 1.5 \[{\frac{\ln \left ( ex+d \right ) Ae}{a{e}^{2}+c{d}^{2}}}-{\frac{\ln \left ( ex+d \right ) Bd}{a{e}^{2}+c{d}^{2}}}-{\frac{\ln \left ( c{x}^{2}+a \right ) Ae}{2\,a{e}^{2}+2\,c{d}^{2}}}+{\frac{\ln \left ( c{x}^{2}+a \right ) Bd}{2\,a{e}^{2}+2\,c{d}^{2}}}+{\frac{Acd}{a{e}^{2}+c{d}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}}+{\frac{aBe}{a{e}^{2}+c{d}^{2}}\arctan \left ({cx{\frac{1}{\sqrt{ac}}}} \right ){\frac{1}{\sqrt{ac}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)/(e*x+d)/(c*x^2+a),x)

[Out]

1/(a*e^2+c*d^2)*ln(e*x+d)*A*e-1/(a*e^2+c*d^2)*ln(e*x+d)*B*d-1/2/(a*e^2+c*d^2)*ln
(c*x^2+a)*A*e+1/2/(a*e^2+c*d^2)*ln(c*x^2+a)*B*d+1/(a*e^2+c*d^2)/(a*c)^(1/2)*arct
an(c*x/(a*c)^(1/2))*A*c*d+1/(a*e^2+c*d^2)/(a*c)^(1/2)*arctan(c*x/(a*c)^(1/2))*a*
B*e

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + a)*(e*x + d)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 1.26821, size = 1, normalized size = 0.01 \[ \left [\frac{{\left (A c d + B a e\right )} \log \left (\frac{2 \, a c x +{\left (c x^{2} - a\right )} \sqrt{-a c}}{c x^{2} + a}\right ) + \sqrt{-a c}{\left ({\left (B d - A e\right )} \log \left (c x^{2} + a\right ) - 2 \,{\left (B d - A e\right )} \log \left (e x + d\right )\right )}}{2 \,{\left (c d^{2} + a e^{2}\right )} \sqrt{-a c}}, \frac{2 \,{\left (A c d + B a e\right )} \arctan \left (\frac{\sqrt{a c} x}{a}\right ) + \sqrt{a c}{\left ({\left (B d - A e\right )} \log \left (c x^{2} + a\right ) - 2 \,{\left (B d - A e\right )} \log \left (e x + d\right )\right )}}{2 \,{\left (c d^{2} + a e^{2}\right )} \sqrt{a c}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + a)*(e*x + d)),x, algorithm="fricas")

[Out]

[1/2*((A*c*d + B*a*e)*log((2*a*c*x + (c*x^2 - a)*sqrt(-a*c))/(c*x^2 + a)) + sqrt
(-a*c)*((B*d - A*e)*log(c*x^2 + a) - 2*(B*d - A*e)*log(e*x + d)))/((c*d^2 + a*e^
2)*sqrt(-a*c)), 1/2*(2*(A*c*d + B*a*e)*arctan(sqrt(a*c)*x/a) + sqrt(a*c)*((B*d -
 A*e)*log(c*x^2 + a) - 2*(B*d - A*e)*log(e*x + d)))/((c*d^2 + a*e^2)*sqrt(a*c))]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)/(e*x+d)/(c*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.279024, size = 140, normalized size = 1.28 \[ \frac{{\left (B d - A e\right )}{\rm ln}\left (c x^{2} + a\right )}{2 \,{\left (c d^{2} + a e^{2}\right )}} - \frac{{\left (B d e - A e^{2}\right )}{\rm ln}\left ({\left | x e + d \right |}\right )}{c d^{2} e + a e^{3}} + \frac{{\left (A c d + B a e\right )} \arctan \left (\frac{c x}{\sqrt{a c}}\right )}{{\left (c d^{2} + a e^{2}\right )} \sqrt{a c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)/((c*x^2 + a)*(e*x + d)),x, algorithm="giac")

[Out]

1/2*(B*d - A*e)*ln(c*x^2 + a)/(c*d^2 + a*e^2) - (B*d*e - A*e^2)*ln(abs(x*e + d))
/(c*d^2*e + a*e^3) + (A*c*d + B*a*e)*arctan(c*x/sqrt(a*c))/((c*d^2 + a*e^2)*sqrt
(a*c))